<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%book_content}}".
 *
 * @property integer $id
 * @property integer $book_id
 * @property integer $category_id
 * @property integer $bid
 * @property integer $chapter_id
 * @property string $content
 * @property integer $add_time
 */
class BookContent extends Common
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%book_content}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['book_id', 'category_id', 'bid', 'chapter_id', 'content', 'add_time'], 'required'],
            [['book_id', 'category_id', 'bid', 'chapter_id', 'add_time'], 'integer'],
            [['content'], 'string'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'book_id' => '书ID',
            'category_id' => '分类ID',
            'bid' => '原书ID',
            'chapter_id' => '章节ID',
            'content' => '内容',
            'add_time' => '添加时间',
        ];
    }
}
